package com.jboom.templates.converter;

import com.jboom.jboomconverter.annotation.Convert;
import com.jboom.jboomconverter.annotation.Converter;
import com.jboom.jboomconverter.factory.ConverterFactory;
import com.jboom.templates.statemachine.java.state.State;
import org.mapstruct.Mapper;
import org.springframework.statemachine.StateMachine;

import java.util.List;

/**
 * @author zhangwen
 * @date 2023/5/27 21:29
 */
@Converter(customizeConverter = MyConverter.class)
public interface BaseConverter {

    BaseConverter INSTANCE = ConverterFactory.getConverter(BaseConverter.class);

    List<String> convertList(List<Integer> list);

    @Convert(source = "userId", target = "uId")
    @Convert(source = "birthday", target = "birthday", dateFormat = "yyyy-MM-dd hh:mm:ss")
    @Convert(source = "extend", target = "extend", customizeMethod = "toExtend")
    @Convert(source = "account.accountNo", target = "account.accountNO")
    UserDTO toDTO(UserVO userVO);

    default String toStr(Integer p) {
        return "";
    }
}
